package com.online.questionnaire.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName answer
 */
@TableName(value ="answer")
@Data
public class Answer implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * userId
     */
    @TableField(value = "userId")
    private Long userId;

    /**
     * userId
     */
    @TableField(value = "surveyId")
    private Long surveyId;


    /**
     * submitId
     */
    @TableField(value = "submitId")
    private Long submitId;

    /**
     * 所属题目id
     */
    @TableField(value = "questionId")
    private Long questionId;

    /**
     * 答卷出现次数(统计用)
     */
    @TableField(exist = false)
    private Long count;

    /**
     * 选项id
     */
    @TableField(value = "optionId")
    private Long optionId;

    /**
     * 答复的值 单选、多选题为选项value  输入为文本
     */
    @TableField(value = "value")
    private String value;

    /**
     * 题目类型 0 单选 1多选 2单行 ...
     */
    @TableField(value = "type")
    private Long type;

    /**
     * 
     */
    @TableField(value = "createTime")
    private Date createtime;

    /**
     * 
     */
    @TableField(value = "updateTime")
    private Date updatetime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}